<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\FeedBack;
use Carbon\Carbon;
use \Cache;

class FeedBackController extends Controller
{
    /**
     * @param Request $request
     * @return \Illuminate\Http\JsonResponse
     * @throws \Illuminate\Validation\ValidationException
     */
    public function create(Request $request)
    {
        $this->validate($request, [
            'content' => 'required|string',
            'image_path' => 'nullable|string',
        ]);

        FeedBack::create([
            'content'=>request('content'),
            'user_id'=>user_id(),
        ]);

        return $this->successReturn('提交成功');
    }


}
